home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-04-03 | 7.4 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: scrollstuff.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Wed Apr 3 18:30:20 1991, modified Wed Apr 3 18:30:20 1991, creator 'MPS ', type ASCII, 6628 bytes "scrollstuff.c" , at 0x1a64 668 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 73 63 72 6f 6c 6c | 73 74 75 66 66 2e 63 00 |..scroll|stuff.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 19 e4 00 | 00 02 9c a4 20 16 0c a4 |........|.... ...|
|00000060| 20 16 0c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 8d 2a 00 00 |........|.....*..|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 23 0d 23 |--------|----.#.#|
|000000c0| 09 4e 65 77 73 57 61 74 | 63 68 65 72 09 2d 20 4d |.NewsWat|cher.- M|
|000000d0| 61 63 69 6e 74 6f 73 68 | 20 4e 4e 54 50 20 43 6c |acintosh| NNTP Cl|
|000000e0| 69 65 6e 74 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ient App|lication|
|000000f0| 0d 23 0d 23 09 57 72 69 | 74 74 65 6e 20 62 79 20 |.#.#.Wri|tten by |
|00000100| 53 74 65 76 65 6e 20 46 | 61 6c 6b 65 6e 62 75 72 |Steven F|alkenbur|
|00000110| 67 0d 23 09 a9 31 39 39 | 30 20 41 70 70 6c 65 20 |g.#..199|0 Apple |
|00000120| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 0d 23 |Computer|, Inc..#|
|00000130| 0d 23 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 23 0d |--------|-----.#.|
|00000170| 23 09 73 63 72 6f 6c 6c | 73 74 75 66 66 2e 63 0d |#.scroll|stuff.c.|
|00000180| 23 0d 23 09 54 68 69 73 | 20 63 6f 64 65 20 6d 6f |#.#.This| code mo|
|00000190| 64 75 6c 65 20 73 75 70 | 70 6f 72 74 73 20 73 63 |dule sup|ports sc|
|000001a0| 72 6f 6c 6c 69 6e 67 20 | 66 6f 72 20 74 65 78 74 |rolling |for text|
|000001b0| 65 64 69 74 20 66 69 65 | 6c 64 73 0d 23 09 6f 66 |edit fie|lds.#.of|
|000001c0| 20 74 65 78 74 20 6c 6f | 63 61 74 65 64 20 69 6e | text lo|cated in|
|000001d0| 20 72 65 73 69 7a 65 61 | 62 6c 65 20 77 69 6e 64 | resizea|ble wind|
|000001e0| 6f 77 73 2e 0d 23 0d 23 | 2d 2d 2d 2d 2d 2d 2d 2d |ows..#.#|--------|
|000001f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000220| 2d 2d 2d 2a 2f 0d 0d 23 | 70 72 61 67 6d 61 20 73 |---*/..#|pragma s|
|00000230| 65 67 6d 65 6e 74 20 75 | 73 65 72 69 6e 74 0d 0d |egment u|serint..|
|00000240| 23 69 6e 63 6c 75 64 65 | 20 22 63 6f 6d 70 61 74 |#include| "compat|
|00000250| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |.h".#inc|lude <st|
|00000260| 64 6c 69 62 2e 68 3e 0d | 0d 23 69 66 64 65 66 20 |dlib.h>.|.#ifdef |
|00000270| 50 52 4f 54 4f 53 0d 0d | 23 69 6e 63 6c 75 64 65 |PROTOS..|#include|
|00000280| 20 3c 54 79 70 65 73 2e | 68 3e 0d 23 69 6e 63 6c | <Types.|h>.#incl|
|00000290| 75 64 65 20 3c 57 69 6e | 64 6f 77 73 2e 68 3e 0d |ude <Win|dows.h>.|
|000002a0| 23 69 6e 63 6c 75 64 65 | 20 3c 54 65 78 74 45 64 |#include| <TextEd|
|000002b0| 69 74 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |it.h>.#i|nclude <|
|000002c0| 43 6f 6e 74 72 6f 6c 73 | 2e 68 3e 0d 23 69 6e 63 |Controls|.h>.#inc|
|000002d0| 6c 75 64 65 20 3c 4f 53 | 55 74 69 6c 73 2e 68 3e |lude <OS|Utils.h>|
|000002e0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 45 76 65 6e 74 |.#includ|e <Event|
|000002f0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 53 |s.h>.#in|clude <S|
|00000300| 74 64 4c 69 62 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |tdLib.h>|.#includ|
|00000310| 65 20 3c 4c 69 73 74 73 | 2e 68 3e 0d 23 65 6e 64 |e <Lists|.h>.#end|
|00000320| 69 66 0d 0d 23 69 6e 63 | 6c 75 64 65 20 22 6e 6e |if..#inc|lude "nn|
|00000330| 74 70 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |tp.h".#i|nclude "|
|00000340| 53 63 72 6f 6c 6c 53 74 | 75 66 66 2e 68 22 0d 0d |ScrollSt|uff.h"..|
|00000350| 0d 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 20 68 |.Control|Handle h|
|00000360| 53 63 72 6f 6c 6c 43 6f | 6e 74 28 57 69 6e 64 6f |ScrollCo|nt(Windo|
|00000370| 77 50 74 72 20 77 69 6e | 64 6f 77 29 0d 7b 0d 09 |wPtr win|dow).{..|
|00000380| 69 66 20 28 47 65 74 43 | 52 65 66 43 6f 6e 28 20 |if (GetC|RefCon( |
|00000390| 28 28 57 69 6e 64 6f 77 | 50 65 65 6b 29 20 77 69 |((Window|Peek) wi|
|000003a0| 6e 64 6f 77 29 2d 3e 63 | 6f 6e 74 72 6f 6c 4c 69 |ndow)->c|ontrolLi|
|000003b0| 73 74 20 29 20 3d 3d 20 | 6b 56 52 65 66 20 29 0d |st ) == |kVRef ).|
|000003c0| 09 09 72 65 74 75 72 6e | 28 28 2a 2a 28 28 28 57 |..return|((**(((W|
|000003d0| 69 6e 64 6f 77 50 65 65 | 6b 29 20 77 69 6e 64 6f |indowPee|k) windo|
|000003e0| 77 29 2d 3e 63 6f 6e 74 | 72 6f 6c 4c 69 73 74 29 |w)->cont|rolList)|
|000003f0| 29 2e 6e 65 78 74 43 6f | 6e 74 72 6f 6c 29 3b 0d |).nextCo|ntrol);.|
|00000400| 09 65 6c 73 65 0d 09 09 | 72 65 74 75 72 6e 28 28 |.else...|return((|
|00000410| 28 57 69 6e 64 6f 77 50 | 65 65 6b 29 20 77 69 6e |(WindowP|eek) win|
|00000420| 64 6f 77 29 2d 3e 63 6f | 6e 74 72 6f 6c 4c 69 73 |dow)->co|ntrolLis|
|00000430| 74 29 3b 0d 7d 0d 0d 0d | 43 6f 6e 74 72 6f 6c 48 |t);.}...|ControlH|
|00000440| 61 6e 64 6c 65 20 76 53 | 63 72 6f 6c 6c 43 6f 6e |andle vS|crollCon|
|00000450| 74 28 57 69 6e 64 6f 77 | 50 74 72 20 77 69 6e 64 |t(Window|Ptr wind|
|00000460| 6f 77 29 0d 7b 0d 09 69 | 66 20 28 47 65 74 43 52 |ow).{..i|f (GetCR|
|00000470| 65 66 43 6f 6e 28 20 28 | 28 57 69 6e 64 6f 77 50 |efCon( (|(WindowP|
|00000480| 65 65 6b 29 20 77 69 6e | 64 6f 77 29 2d 3e 63 6f |eek) win|dow)->co|
|00000490| 6e 74 72 6f 6c 4c 69 73 | 74 20 29 20 3d 3d 20 6b |ntrolLis|t ) == k|
|000004a0| 48 52 65 66 20 29 0d 09 | 09 72 65 74 75 72 6e 28 |HRef )..|.return(|
|000004b0| 28 2a 2a 28 28 28 57 69 | 6e 64 6f 77 50 65 65 6b |(**(((Wi|ndowPeek|
|000004c0| 29 20 77 69 6e 64 6f 77 | 29 2d 3e 63 6f 6e 74 72 |) window|)->contr|
|000004d0| 6f 6c 4c 69 73 74 29 29 | 2e 6e 65 78 74 43 6f 6e |olList))|.nextCon|
|000004e0| 74 72 6f 6c 29 3b 0d 09 | 65 6c 73 65 0d 09 09 72 |trol);..|else...r|
|000004f0| 65 74 75 72 6e 28 28 28 | 57 69 6e 64 6f 77 50 65 |eturn(((|WindowPe|
|00000500| 65 6b 29 20 77 69 6e 64 | 6f 77 29 2d 3e 63 6f 6e |ek) wind|ow)->con|
|00000510| 74 72 6f 6c 4c 69 73 74 | 29 3b 0d 7d 0d 0d 0d 6c |trolList|);.}...l|
|00000520| 6f 6e 67 20 73 69 67 6e | 28 6c 6f 6e 67 20 6c 6f |ong sign|(long lo|
|00000530| 6e 67 56 61 72 29 0d 7b | 0d 09 69 66 20 28 6c 6f |ngVar).{|..if (lo|
|00000540| 6e 67 56 61 72 3e 3d 30 | 29 0d 09 09 72 65 74 75 |ngVar>=0|)...retu|
|00000550| 72 6e 28 31 29 3b 0d 09 | 65 6c 73 65 0d 09 09 72 |rn(1);..|else...r|
|00000560| 65 74 75 72 6e 28 2d 31 | 29 3b 0d 7d 0d 0d 0d 73 |eturn(-1|);.}...s|
|00000570| 68 6f 72 74 20 4c 69 6e | 65 73 49 6e 54 65 78 74 |hort Lin|esInText|
|00000580| 28 54 45 48 61 6e 64 6c | 65 20 74 68 65 54 45 29 |(TEHandl|e theTE)|
|00000590| 0d 7b 0d 09 73 68 6f 72 | 74 20 6c 69 6e 65 73 3b |.{..shor|t lines;|
|000005a0| 0d 09 48 61 6e 64 6c 65 | 20 74 65 78 74 48 61 6e |..Handle| textHan|
|000005b0| 64 6c 65 3b 0d 09 0d 09 | 6c 69 6e 65 73 20 3d 20 |dle;....|lines = |
|000005c0| 28 2a 2a 74 68 65 54 45 | 29 2e 6e 4c 69 6e 65 73 |(**theTE|).nLines|
|000005d0| 3b 0d 09 74 65 78 74 48 | 61 6e 64 6c 65 20 3d 20 |;..textH|andle = |
|000005e0| 28 2a 2a 74 68 65 54 45 | 29 2e 68 54 65 78 74 3b |(**theTE|).hText;|
|000005f0| 0d 09 69 66 20 28 20 28 | 2a 2a 74 68 65 54 45 29 |..if ( (|**theTE)|
|00000600| 2e 74 65 4c 65 6e 67 74 | 68 20 3e 20 30 20 29 20 |.teLengt|h > 0 ) |
|00000610| 7b 0d 09 09 69 66 20 28 | 20 2a 28 2a 74 65 78 74 |{...if (| *(*text|
|00000620| 48 61 6e 64 6c 65 2b 28 | 28 2a 2a 74 68 65 54 45 |Handle+(|(**theTE|
|00000630| 29 2e 74 65 4c 65 6e 67 | 74 68 20 2d 20 31 29 29 |).teLeng|th - 1))|
|00000640| 20 3d 3d 20 43 52 20 29 | 0d 09 09 09 6c 69 6e 65 | == CR )|....line|
|00000650| 73 2b 2b 3b 0d 09 09 72 | 65 74 75 72 6e 28 6c 69 |s++;...r|eturn(li|
|00000660| 6e 65 73 29 3b 0d 09 7d | 0d 7d 0d 0d 0d 76 6f 69 |nes);..}|.}...voi|
|00000670| 64 20 4d 6f 76 65 54 65 | 78 74 28 57 69 6e 64 6f |d MoveTe|xt(Windo|
|00000680| 77 50 74 72 20 77 69 6e | 64 6f 77 2c 43 6f 6e 74 |wPtr win|dow,Cont|
|00000690| 72 6f 6c 48 61 6e 64 6c | 65 20 74 68 65 43 6f 6e |rolHandl|e theCon|
|000006a0| 74 72 6f 6c 29 0d 7b 0d | 09 6c 6f 6e 67 09 76 69 |trol).{.|.long.vi|
|000006b0| 65 77 54 6f 70 2c 64 65 | 73 74 54 6f 70 3b 0d 09 |ewTop,de|stTop;..|
|000006c0| 6c 6f 6e 67 09 73 63 72 | 6f 6c 6c 56 61 6c 75 65 |long.scr|ollValue|
|000006d0| 3b 0d 09 6c 6f 6e 67 09 | 73 63 72 6f 6c 6c 44 69 |;..long.|scrollDi|
|000006e0| 66 66 2c 6f 6c 64 53 63 | 72 6f 6c 6c 2c 6e 65 77 |ff,oldSc|roll,new|
|000006f0| 53 63 72 6f 6c 6c 3b 0d | 09 73 68 6f 72 74 09 68 |Scroll;.|.short.h|
|00000700| 65 69 67 68 74 3b 0d 09 | 54 45 48 61 6e 64 6c 65 |eight;..|TEHandle|
|00000710| 20 74 68 65 54 45 3b 0d | 09 0d 09 74 68 65 54 45 | theTE;.|...theTE|
|00000720| 20 3d 20 28 54 45 48 61 | 6e 64 6c 65 29 28 28 28 | = (TEHa|ndle)(((|
|00000730| 54 77 69 6e 64 6f 77 49 | 6e 66 6f 20 2a 29 47 65 |TwindowI|nfo *)Ge|
|00000740| 74 57 52 65 66 43 6f 6e | 28 77 69 6e 64 6f 77 29 |tWRefCon|(window)|
|00000750| 29 2d 3e 64 61 74 61 29 | 3b 09 0d 0d 09 69 66 20 |)->data)|;....if |
|00000760| 28 74 68 65 43 6f 6e 74 | 72 6f 6c 20 3d 3d 20 76 |(theCont|rol == v|
|00000770| 53 63 72 6f 6c 6c 43 6f | 6e 74 28 77 69 6e 64 6f |ScrollCo|nt(windo|
|00000780| 77 29 29 20 7b 0d 09 09 | 76 69 65 77 54 6f 70 20 |w)) {...|viewTop |
|00000790| 3d 20 28 2a 2a 74 68 65 | 54 45 29 2e 76 69 65 77 |= (**the|TE).view|
|000007a0| 52 65 63 74 2e 74 6f 70 | 3b 0d 09 09 64 65 73 74 |Rect.top|;...dest|
|000007b0| 54 6f 70 20 3d 20 28 2a | 2a 74 68 65 54 45 29 2e |Top = (*|*theTE).|
|000007c0| 64 65 73 74 52 65 63 74 | 2e 74 6f 70 3b 0d 09 09 |destRect|.top;...|
|000007d0| 6f 6c 64 53 63 72 6f 6c | 6c 20 3d 20 76 69 65 77 |oldScrol|l = view|
|000007e0| 54 6f 70 20 2d 20 64 65 | 73 74 54 6f 70 3b 0d 09 |Top - de|stTop;..|
|000007f0| 09 73 63 72 6f 6c 6c 56 | 61 6c 75 65 20 3d 20 47 |.scrollV|alue = G|
|00000800| 65 74 43 74 6c 56 61 6c | 75 65 28 74 68 65 43 6f |etCtlVal|ue(theCo|
|00000810| 6e 74 72 6f 6c 29 3b 0d | 09 09 68 65 69 67 68 74 |ntrol);.|..height|
|00000820| 20 3d 20 28 2a 2a 74 68 | 65 54 45 29 2e 6c 69 6e | = (**th|eTE).lin|
|00000830| 65 48 65 69 67 68 74 3b | 0d 09 09 6e 65 77 53 63 |eHeight;|...newSc|
|00000840| 72 6f 6c 6c 20 3d 20 73 | 63 72 6f 6c 6c 56 61 6c |roll = s|crollVal|
|00000850| 75 65 20 2a 20 68 65 69 | 67 68 74 3b 0d 09 09 73 |ue * hei|ght;...s|
|00000860| 63 72 6f 6c 6c 44 69 66 | 66 20 3d 20 6f 6c 64 53 |crollDif|f = oldS|
|00000870| 63 72 6f 6c 6c 20 2d 20 | 6e 65 77 53 63 72 6f 6c |croll - |newScrol|
|00000880| 6c 3b 0d 09 09 69 66 20 | 28 61 62 73 28 73 63 72 |l;...if |(abs(scr|
|00000890| 6f 6c 6c 44 69 66 66 29 | 3e 33 32 30 30 30 29 20 |ollDiff)|>32000) |
|000008a0| 7b 0d 09 09 09 54 45 53 | 63 72 6f 6c 6c 28 30 4c |{....TES|croll(0L|
|000008b0| 2c 73 69 67 6e 28 73 63 | 72 6f 6c 6c 44 69 66 66 |,sign(sc|rollDiff|
|000008c0| 29 20 2a 20 33 32 30 30 | 30 2c 74 68 65 54 45 29 |) * 3200|0,theTE)|
|000008d0| 3b 0d 09 09 09 53 79 73 | 42 65 65 70 28 33 30 29 |;....Sys|Beep(30)|
|000008e0| 3b 0d 09 09 7d 0d 09 09 | 65 6c 73 65 20 69 66 20 |;...}...|else if |
|000008f0| 28 73 63 72 6f 6c 6c 44 | 69 66 66 20 21 3d 20 30 |(scrollD|iff != 0|
|00000900| 29 0d 09 09 09 54 45 53 | 63 72 6f 6c 6c 28 30 4c |)....TES|croll(0L|
|00000910| 2c 73 63 72 6f 6c 6c 44 | 69 66 66 2c 74 68 65 54 |,scrollD|iff,theT|
|00000920| 45 29 3b 0d 09 7d 0d 09 | 65 6c 73 65 20 7b 0d 09 |E);..}..|else {..|
|00000930| 09 76 69 65 77 54 6f 70 | 20 3d 20 28 2a 2a 74 68 |.viewTop| = (**th|
|00000940| 65 54 45 29 2e 76 69 65 | 77 52 65 63 74 2e 6c 65 |eTE).vie|wRect.le|
|00000950| 66 74 3b 0d 09 09 64 65 | 73 74 54 6f 70 20 3d 20 |ft;...de|stTop = |
|00000960| 28 2a 2a 74 68 65 54 45 | 29 2e 64 65 73 74 52 65 |(**theTE|).destRe|
|00000970| 63 74 2e 6c 65 66 74 3b | 0d 09 09 6f 6c 64 53 63 |ct.left;|...oldSc|
|00000980| 72 6f 6c 6c 20 3d 20 76 | 69 65 77 54 6f 70 20 2d |roll = v|iewTop -|
|00000990| 20 64 65 73 74 54 6f 70 | 3b 0d 09 09 73 63 72 6f | destTop|;...scro|
|000009a0| 6c 6c 56 61 6c 75 65 20 | 3d 20 47 65 74 43 74 6c |llValue |= GetCtl|
|000009b0| 56 61 6c 75 65 28 74 68 | 65 43 6f 6e 74 72 6f 6c |Value(th|eControl|
|000009c0| 29 3b 0d 09 09 6e 65 77 | 53 63 72 6f 6c 6c 20 3d |);...new|Scroll =|
|000009d0| 20 73 63 72 6f 6c 6c 56 | 61 6c 75 65 20 2a 20 6b | scrollV|alue * k|
|000009e0| 54 65 78 74 57 69 64 74 | 68 3b 0d 09 09 73 63 72 |TextWidt|h;...scr|
|000009f0| 6f 6c 6c 44 69 66 66 20 | 3d 20 6f 6c 64 53 63 72 |ollDiff |= oldScr|
|00000a00| 6f 6c 6c 20 2d 20 6e 65 | 77 53 63 72 6f 6c 6c 3b |oll - ne|wScroll;|
|00000a10| 0d 09 09 69 66 20 28 61 | 62 73 28 73 63 72 6f 6c |...if (a|bs(scrol|
|00000a20| 6c 44 69 66 66 29 3e 33 | 32 30 30 30 29 20 7b 0d |lDiff)>3|2000) {.|
|00000a30| 09 09 09 54 45 53 63 72 | 6f 6c 6c 28 73 69 67 6e |...TEScr|oll(sign|
|00000a40| 28 73 63 72 6f 6c 6c 44 | 69 66 66 29 20 2a 20 33 |(scrollD|iff) * 3|
|00000a50| 32 30 30 30 2c 30 4c 2c | 74 68 65 54 45 29 3b 0d |2000,0L,|theTE);.|
|00000a60| 09 09 09 53 79 73 42 65 | 65 70 28 33 30 29 3b 0d |...SysBe|ep(30);.|
|00000a70| 09 09 7d 0d 09 09 65 6c | 73 65 20 69 66 20 28 73 |..}...el|se if (s|
|00000a80| 63 72 6f 6c 6c 44 69 66 | 66 20 21 3d 20 30 29 0d |crollDif|f != 0).|
|00000a90| 09 09 09 54 45 53 63 72 | 6f 6c 6c 28 73 63 72 6f |...TEScr|oll(scro|
|00000aa0| 6c 6c 44 69 66 66 2c 30 | 4c 2c 74 68 65 54 45 29 |llDiff,0|L,theTE)|
|00000ab0| 3b 0d 09 7d 0d 7d 0d 0d | 0d 76 6f 69 64 20 41 64 |;..}.}..|.void Ad|
|00000ac0| 6a 75 73 74 53 63 72 6f | 6c 6c 42 61 72 28 57 69 |justScro|llBar(Wi|
|00000ad0| 6e 64 6f 77 50 74 72 20 | 77 69 6e 64 6f 77 29 0d |ndowPtr |window).|
|00000ae0| 7b 0d 09 73 68 6f 72 74 | 20 77 69 6e 64 6f 77 4c |{..short| windowL|
|00000af0| 69 6e 65 73 2c 63 75 72 | 72 65 6e 74 4c 69 6e 65 |ines,cur|rentLine|
|00000b00| 73 3b 0d 09 54 45 48 61 | 6e 64 6c 65 20 74 68 65 |s;..TEHa|ndle the|
|00000b10| 54 45 3b 0d 09 0d 09 74 | 68 65 54 45 20 3d 20 28 |TE;....t|heTE = (|
|00000b20| 54 45 48 61 6e 64 6c 65 | 29 28 28 28 54 77 69 6e |TEHandle|)(((Twin|
|00000b30| 64 6f 77 49 6e 66 6f 20 | 2a 29 47 65 74 57 52 65 |dowInfo |*)GetWRe|
|00000b40| 66 43 6f 6e 28 77 69 6e | 64 6f 77 29 29 2d 3e 64 |fCon(win|dow))->d|
|00000b50| 61 74 61 29 3b 09 0d 0d | 09 77 69 6e 64 6f 77 4c |ata);...|.windowL|
|00000b60| 69 6e 65 73 20 3d 20 28 | 28 2a 2a 74 68 65 54 45 |ines = (|(**theTE|
|00000b70| 29 2e 76 69 65 77 52 65 | 63 74 2e 62 6f 74 74 6f |).viewRe|ct.botto|
|00000b80| 6d 20 2d 20 28 2a 2a 74 | 68 65 54 45 29 2e 76 69 |m - (**t|heTE).vi|
|00000b90| 65 77 52 65 63 74 2e 74 | 6f 70 29 20 2f 20 28 2a |ewRect.t|op) / (*|
|00000ba0| 2a 74 68 65 54 45 29 2e | 6c 69 6e 65 48 65 69 67 |*theTE).|lineHeig|
|00000bb0| 68 74 3b 0d 09 69 66 20 | 28 28 63 75 72 72 65 6e |ht;..if |((curren|
|00000bc0| 74 4c 69 6e 65 73 20 3d | 20 4c 69 6e 65 73 49 6e |tLines =| LinesIn|
|00000bd0| 54 65 78 74 28 74 68 65 | 54 45 29 29 20 3e 3d 20 |Text(the|TE)) >= |
|00000be0| 77 69 6e 64 6f 77 4c 69 | 6e 65 73 29 0d 09 09 53 |windowLi|nes)...S|
|00000bf0| 65 74 43 74 6c 4d 61 78 | 28 76 53 63 72 6f 6c 6c |etCtlMax|(vScroll|
|00000c00| 43 6f 6e 74 28 77 69 6e | 64 6f 77 29 2c 63 75 72 |Cont(win|dow),cur|
|00000c10| 72 65 6e 74 4c 69 6e 65 | 73 20 2d 20 77 69 6e 64 |rentLine|s - wind|
|00000c20| 6f 77 4c 69 6e 65 73 29 | 3b 0d 09 65 6c 73 65 0d |owLines)|;..else.|
|00000c30| 09 09 53 65 74 43 74 6c | 4d 61 78 28 76 53 63 72 |..SetCtl|Max(vScr|
|00000c40| 6f 6c 6c 43 6f 6e 74 28 | 77 69 6e 64 6f 77 29 2c |ollCont(|window),|
|00000c50| 30 4c 29 3b 0d 09 0d 09 | 77 69 6e 64 6f 77 4c 69 |0L);....|windowLi|
|00000c60| 6e 65 73 20 3d 20 28 28 | 2a 2a 74 68 65 54 45 29 |nes = ((|**theTE)|
|00000c70| 2e 76 69 65 77 52 65 63 | 74 2e 72 69 67 68 74 20 |.viewRec|t.right |
|00000c80| 2d 20 28 2a 2a 74 68 65 | 54 45 29 2e 76 69 65 77 |- (**the|TE).view|
|00000c90| 52 65 63 74 2e 6c 65 66 | 74 29 20 2f 20 6b 54 65 |Rect.lef|t) / kTe|
|00000ca0| 78 74 57 69 64 74 68 3b | 0d 09 69 66 20 28 6b 4d |xtWidth;|..if (kM|
|00000cb0| 61 78 43 6f 6c 75 6d 6e | 73 20 3e 3d 20 77 69 6e |axColumn|s >= win|
|00000cc0| 64 6f 77 4c 69 6e 65 73 | 29 0d 09 09 53 65 74 43 |dowLines|)...SetC|
|00000cd0| 74 6c 4d 61 78 28 68 53 | 63 72 6f 6c 6c 43 6f 6e |tlMax(hS|crollCon|
|00000ce0| 74 28 77 69 6e 64 6f 77 | 29 2c 6b 4d 61 78 43 6f |t(window|),kMaxCo|
|00000cf0| 6c 75 6d 6e 73 29 3b 0d | 09 65 6c 73 65 0d 09 09 |lumns);.|.else...|
|00000d00| 53 65 74 43 74 6c 4d 61 | 78 28 68 53 63 72 6f 6c |SetCtlMa|x(hScrol|
|00000d10| 6c 43 6f 6e 74 28 77 69 | 6e 64 6f 77 29 2c 30 4c |lCont(wi|ndow),0L|
|00000d20| 29 3b 0d 7d 0d 0d 0d 76 | 6f 69 64 20 53 63 72 6f |);.}...v|oid Scro|
|00000d30| 6c 6c 43 68 61 72 28 57 | 69 6e 64 6f 77 50 74 72 |llChar(W|indowPtr|
|00000d40| 20 77 69 6e 64 6f 77 2c | 73 68 6f 72 74 20 63 68 | window,|short ch|
|00000d50| 61 72 50 6f 73 2c 42 6f | 6f 6c 65 61 6e 20 74 6f |arPos,Bo|olean to|
|00000d60| 42 6f 74 74 6f 6d 29 0d | 7b 0d 09 73 68 6f 72 74 |Bottom).|{..short|
|00000d70| 20 74 68 65 4c 69 6e 65 | 2c 77 69 6e 64 6f 77 4c | theLine|,windowL|
|00000d80| 69 6e 65 73 3b 0d 09 54 | 45 48 61 6e 64 6c 65 20 |ines;..T|EHandle |
|00000d90| 74 68 65 54 45 3b 0d 09 | 0d 09 74 68 65 54 45 20 |theTE;..|..theTE |
|00000da0| 3d 20 28 54 45 48 61 6e | 64 6c 65 29 28 28 28 54 |= (TEHan|dle)(((T|
|00000db0| 77 69 6e 64 6f 77 49 6e | 66 6f 20 2a 29 47 65 74 |windowIn|fo *)Get|
|00000dc0| 57 52 65 66 43 6f 6e 28 | 77 69 6e 64 6f 77 29 29 |WRefCon(|window))|
|00000dd0| 2d 3e 64 61 74 61 29 3b | 09 0d 09 0d 09 74 68 65 |->data);|.....the|
|00000de0| 4c 69 6e 65 20 3d 20 30 | 3b 0d 09 77 68 69 6c 65 |Line = 0|;..while|
|00000df0| 20 28 20 28 2a 2a 74 68 | 65 54 45 29 2e 6c 69 6e | ( (**th|eTE).lin|
|00000e00| 65 53 74 61 72 74 73 5b | 74 68 65 4c 69 6e 65 20 |eStarts[|theLine |
|00000e10| 2b 20 31 5d 20 3c 3d 20 | 63 68 61 72 50 6f 73 20 |+ 1] <= |charPos |
|00000e20| 29 0d 09 09 74 68 65 4c | 69 6e 65 2b 2b 3b 0d 09 |)...theL|ine++;..|
|00000e30| 69 66 20 28 74 6f 42 6f | 74 74 6f 6d 29 20 7b 0d |if (toBo|ttom) {.|
|00000e40| 09 09 77 69 6e 64 6f 77 | 4c 69 6e 65 73 20 3d 20 |..window|Lines = |
|00000e50| 28 28 2a 2a 74 68 65 54 | 45 29 2e 76 69 65 77 52 |((**theT|E).viewR|
|00000e60| 65 63 74 2e 62 6f 74 74 | 6f 6d 20 2d 20 28 2a 2a |ect.bott|om - (**|
|00000e70| 74 68 65 54 45 29 2e 76 | 69 65 77 52 65 63 74 2e |theTE).v|iewRect.|
|00000e80| 74 6f 70 29 20 2f 20 28 | 2a 2a 74 68 65 54 45 29 |top) / (|**theTE)|
|00000e90| 2e 6c 69 6e 65 48 65 69 | 67 68 74 3b 0d 09 09 74 |.lineHei|ght;...t|
|00000ea0| 68 65 4c 69 6e 65 20 3d | 20 74 68 65 4c 69 6e 65 |heLine =| theLine|
|00000eb0| 20 2d 20 28 77 69 6e 64 | 6f 77 4c 69 6e 65 73 20 | - (wind|owLines |
|00000ec0| 2d 20 31 29 3b 0d 09 7d | 0d 09 53 65 74 43 74 6c |- 1);..}|..SetCtl|
|00000ed0| 56 61 6c 75 65 28 76 53 | 63 72 6f 6c 6c 43 6f 6e |Value(vS|crollCon|
|00000ee0| 74 28 77 69 6e 64 6f 77 | 29 2c 74 68 65 4c 69 6e |t(window|),theLin|
|00000ef0| 65 29 3b 0d 09 4d 6f 76 | 65 54 65 78 74 28 77 69 |e);..Mov|eText(wi|
|00000f00| 6e 64 6f 77 2c 68 53 63 | 72 6f 6c 6c 43 6f 6e 74 |ndow,hSc|rollCont|
|00000f10| 28 77 69 6e 64 6f 77 29 | 29 3b 0d 09 4d 6f 76 65 |(window)|);..Move|
|00000f20| 54 65 78 74 28 77 69 6e | 64 6f 77 2c 76 53 63 72 |Text(win|dow,vScr|
|00000f30| 6f 6c 6c 43 6f 6e 74 28 | 77 69 6e 64 6f 77 29 29 |ollCont(|window))|
|00000f40| 3b 0d 7d 0d 0d 0d 76 6f | 69 64 20 43 68 65 63 6b |;.}...vo|id Check|
|00000f50| 49 6e 73 65 72 74 69 6f | 6e 28 57 69 6e 64 6f 77 |Insertio|n(Window|
|00000f60| 50 74 72 20 77 69 6e 64 | 6f 77 29 0d 7b 0d 09 73 |Ptr wind|ow).{..s|
|00000f70| 68 6f 72 74 20 74 6f 70 | 4c 69 6e 65 2c 62 6f 74 |hort top|Line,bot|
|00000f80| 74 6f 6d 4c 69 6e 65 2c | 77 69 6e 64 6f 77 4c 69 |tomLine,|windowLi|
|00000f90| 6e 65 73 3b 0d 09 54 45 | 48 61 6e 64 6c 65 20 74 |nes;..TE|Handle t|
|00000fa0| 68 65 54 45 3b 0d 09 0d | 09 74 68 65 54 45 20 3d |heTE;...|.theTE =|
|00000fb0| 20 28 54 45 48 61 6e 64 | 6c 65 29 28 28 28 54 77 | (TEHand|le)(((Tw|
|00000fc0| 69 6e 64 6f 77 49 6e 66 | 6f 20 2a 29 47 65 74 57 |indowInf|o *)GetW|
|00000fd0| 52 65 66 43 6f 6e 28 77 | 69 6e 64 6f 77 29 29 2d |RefCon(w|indow))-|
|00000fe0| 3e 64 61 74 61 29 3b 09 | 0d 09 0d 09 77 69 6e 64 |>data);.|....wind|
|00000ff0| 6f 77 4c 69 6e 65 73 20 | 3d 20 28 28 2a 2a 74 68 |owLines |= ((**th|
|00001000| 65 54 45 29 2e 76 69 65 | 77 52 65 63 74 2e 62 6f |eTE).vie|wRect.bo|
|00001010| 74 74 6f 6d 20 2d 20 28 | 2a 2a 74 68 65 54 45 29 |ttom - (|**theTE)|
|00001020| 2e 76 69 65 77 52 65 63 | 74 2e 74 6f 70 29 20 2f |.viewRec|t.top) /|
|00001030| 20 28 2a 2a 74 68 65 54 | 45 29 2e 6c 69 6e 65 48 | (**theT|E).lineH|
|00001040| 65 69 67 68 74 3b 0d 09 | 74 6f 70 4c 69 6e 65 20 |eight;..|topLine |
|00001050| 3d 20 47 65 74 43 74 6c | 56 61 6c 75 65 28 76 53 |= GetCtl|Value(vS|
|00001060| 63 72 6f 6c 6c 43 6f 6e | 74 28 77 69 6e 64 6f 77 |crollCon|t(window|
|00001070| 29 29 3b 0d 09 62 6f 74 | 74 6f 6d 4c 69 6e 65 20 |));..bot|tomLine |
|00001080| 3d 20 74 6f 70 4c 69 6e | 65 20 2b 20 77 69 6e 64 |= topLin|e + wind|
|00001090| 6f 77 4c 69 6e 65 73 3b | 0d 09 69 66 20 28 47 65 |owLines;|..if (Ge|
|000010a0| 74 43 74 6c 4d 61 78 28 | 76 53 63 72 6f 6c 6c 43 |tCtlMax(|vScrollC|
|000010b0| 6f 6e 74 28 77 69 6e 64 | 6f 77 29 29 20 3d 3d 20 |ont(wind|ow)) == |
|000010c0| 30 29 0d 09 09 4d 6f 76 | 65 54 65 78 74 28 77 69 |0)...Mov|eText(wi|
|000010d0| 6e 64 6f 77 2c 76 53 63 | 72 6f 6c 6c 43 6f 6e 74 |ndow,vSc|rollCont|
|000010e0| 28 77 69 6e 64 6f 77 29 | 29 3b 0d 09 65 6c 73 65 |(window)|);..else|
|000010f0| 20 69 66 20 28 28 2a 2a | 74 68 65 54 45 29 2e 73 | if ((**|theTE).s|
|00001100| 65 6c 45 6e 64 20 3c 20 | 28 2a 2a 74 68 65 54 45 |elEnd < |(**theTE|
|00001110| 29 2e 6c 69 6e 65 53 74 | 61 72 74 73 5b 74 6f 70 |).lineSt|arts[top|
|00001120| 4c 69 6e 65 5d 29 0d 09 | 09 53 63 72 6f 6c 6c 43 |Line])..|.ScrollC|
|00001130| 68 61 72 28 77 69 6e 64 | 6f 77 2c 28 2a 2a 74 68 |har(wind|ow,(**th|
|00001140| 65 54 45 29 2e 73 65 6c | 53 74 61 72 74 2c 66 61 |eTE).sel|Start,fa|
|00001150| 6c 73 65 29 3b 0d 09 65 | 6c 73 65 20 69 66 20 28 |lse);..e|lse if (|
|00001160| 28 2a 2a 74 68 65 54 45 | 29 2e 73 65 6c 53 74 61 |(**theTE|).selSta|
|00001170| 72 74 20 3e 3d 20 28 2a | 2a 74 68 65 54 45 29 2e |rt >= (*|*theTE).|
|00001180| 6c 69 6e 65 53 74 61 72 | 74 73 5b 62 6f 74 74 6f |lineStar|ts[botto|
|00001190| 6d 4c 69 6e 65 5d 29 0d | 09 09 53 63 72 6f 6c 6c |mLine]).|..Scroll|
|000011a0| 43 68 61 72 28 77 69 6e | 64 6f 77 2c 28 2a 2a 74 |Char(win|dow,(**t|
|000011b0| 68 65 54 45 29 2e 73 65 | 6c 45 6e 64 2c 74 72 75 |heTE).se|lEnd,tru|
|000011c0| 65 29 3b 0d 7d 0d 0d 0d | 70 61 73 63 61 6c 20 76 |e);.}...|pascal v|
|000011d0| 6f 69 64 20 73 63 72 6f | 6c 6c 5f 61 63 74 69 6f |oid scro|ll_actio|
|000011e0| 6e 28 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 20 |n(Contro|lHandle |
|000011f0| 73 63 72 6f 6c 6c 42 61 | 72 2c 73 68 6f 72 74 20 |scrollBa|r,short |
|00001200| 70 61 72 74 29 0d 7b 0d | 09 73 68 6f 72 74 09 73 |part).{.|.short.s|
|00001210| 63 72 6f 6c 6c 41 6d 74 | 20 3d 20 30 2c 70 61 67 |crollAmt| = 0,pag|
|00001220| 65 53 69 7a 65 3b 0d 09 | 73 68 6f 72 74 09 74 68 |eSize;..|short.th|
|00001230| 65 43 74 6c 56 61 6c 75 | 65 3b 0d 09 54 45 48 61 |eCtlValu|e;..TEHa|
|00001240| 6e 64 6c 65 20 74 68 65 | 54 45 3b 0d 09 0d 09 74 |ndle the|TE;....t|
|00001250| 68 65 54 45 20 3d 20 28 | 54 45 48 61 6e 64 6c 65 |heTE = (|TEHandle|
|00001260| 29 28 28 28 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 |)(((Twin|dowInfo |
|00001270| 2a 29 47 65 74 57 52 65 | 66 43 6f 6e 28 46 72 6f |*)GetWRe|fCon(Fro|
|00001280| 6e 74 57 69 6e 64 6f 77 | 28 29 29 29 2d 3e 64 61 |ntWindow|()))->da|
|00001290| 74 61 29 3b 09 0d 09 0d | 09 70 61 67 65 53 69 7a |ta);....|.pageSiz|
|000012a0| 65 20 3d 20 20 28 28 2a | 2a 74 68 65 54 45 29 2e |e = ((*|*theTE).|
|000012b0| 76 69 65 77 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |viewRect|.bottom |
|000012c0| 2d 20 28 2a 2a 74 68 65 | 54 45 29 2e 76 69 65 77 |- (**the|TE).view|
|000012d0| 52 65 63 74 2e 74 6f 70 | 29 20 2f 20 28 2a 2a 74 |Rect.top|) / (**t|
|000012e0| 68 65 54 45 29 2e 6c 69 | 6e 65 48 65 69 67 68 74 |heTE).li|neHeight|
|000012f0| 20 2d 20 31 3b 0d 09 73 | 77 69 74 63 68 20 28 70 | - 1;..s|witch (p|
|00001300| 61 72 74 29 20 7b 0d 09 | 09 63 61 73 65 20 69 6e |art) {..|.case in|
|00001310| 55 70 42 75 74 74 6f 6e | 3a 0d 09 09 09 73 63 72 |UpButton|:....scr|
|00001320| 6f 6c 6c 41 6d 74 20 3d | 20 2d 31 3b 0d 09 09 09 |ollAmt =| -1;....|
|00001330| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 69 6e |break;..|.case in|
|00001340| 44 6f 77 6e 42 75 74 74 | 6f 6e 3a 0d 09 09 09 73 |DownButt|on:....s|
|00001350| 63 72 6f 6c 6c 41 6d 74 | 20 3d 20 31 3b 0d 09 09 |crollAmt| = 1;...|
|00001360| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 69 |.break;.|..case i|
|00001370| 6e 50 61 67 65 55 70 3a | 0d 09 09 09 73 63 72 6f |nPageUp:|....scro|
|00001380| 6c 6c 41 6d 74 20 3d 20 | 2d 70 61 67 65 53 69 7a |llAmt = |-pageSiz|
|00001390| 65 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |e;....br|eak;...c|
|000013a0| 61 73 65 20 69 6e 50 61 | 67 65 44 6f 77 6e 3a 0d |ase inPa|geDown:.|
|000013b0| 09 09 09 73 63 72 6f 6c | 6c 41 6d 74 20 3d 20 70 |...scrol|lAmt = p|
|000013c0| 61 67 65 53 69 7a 65 3b | 0d 09 09 09 62 72 65 61 |ageSize;|....brea|
|000013d0| 6b 3b 0d 09 7d 0d 09 74 | 68 65 43 74 6c 56 61 6c |k;..}..t|heCtlVal|
|000013e0| 75 65 20 3d 20 47 65 74 | 43 74 6c 56 61 6c 75 65 |ue = Get|CtlValue|
|000013f0| 28 73 63 72 6f 6c 6c 42 | 61 72 29 2b 73 63 72 6f |(scrollB|ar)+scro|
|00001400| 6c 6c 41 6d 74 3b 0d 09 | 69 66 20 28 70 61 72 74 |llAmt;..|if (part|
|00001410| 20 3d 3d 20 69 6e 50 61 | 67 65 44 6f 77 6e 20 7c | == inPa|geDown ||
|00001420| 7c 20 70 61 72 74 20 3d | 3d 20 69 6e 50 61 67 65 || part =|= inPage|
|00001430| 55 70 20 7c 7c 20 74 68 | 65 43 74 6c 56 61 6c 75 |Up || th|eCtlValu|
|00001440| 65 20 3c 3d 20 47 65 74 | 43 74 6c 4d 61 78 28 73 |e <= Get|CtlMax(s|
|00001450| 63 72 6f 6c 6c 42 61 72 | 29 20 26 26 20 74 68 65 |crollBar|) && the|
|00001460| 43 74 6c 56 61 6c 75 65 | 20 3e 3d 20 47 65 74 43 |CtlValue| >= GetC|
|00001470| 74 6c 4d 69 6e 28 73 63 | 72 6f 6c 6c 42 61 72 29 |tlMin(sc|rollBar)|
|00001480| 29 20 7b 0d 09 09 53 65 | 74 43 74 6c 56 61 6c 75 |) {...Se|tCtlValu|
|00001490| 65 28 73 63 72 6f 6c 6c | 42 61 72 2c 47 65 74 43 |e(scroll|Bar,GetC|
|000014a0| 74 6c 56 61 6c 75 65 28 | 73 63 72 6f 6c 6c 42 61 |tlValue(|scrollBa|
|000014b0| 72 29 2b 73 63 72 6f 6c | 6c 41 6d 74 29 3b 0d 09 |r)+scrol|lAmt);..|
|000014c0| 09 4d 6f 76 65 54 65 78 | 74 28 46 72 6f 6e 74 57 |.MoveTex|t(FrontW|
|000014d0| 69 6e 64 6f 77 28 29 2c | 73 63 72 6f 6c 6c 42 61 |indow(),|scrollBa|
|000014e0| 72 29 3b 0d 09 7d 0d 7d | 0d 0d 0d 76 6f 69 64 20 |r);..}.}|...void |
|000014f0| 44 6f 53 63 72 6f 6c 6c | 65 72 73 28 43 6f 6e 74 |DoScroll|ers(Cont|
|00001500| 72 6f 6c 48 61 6e 64 6c | 65 20 73 63 72 6f 6c 6c |rolHandl|e scroll|
|00001510| 42 61 72 2c 73 68 6f 72 | 74 20 70 61 72 74 2c 50 |Bar,shor|t part,P|
|00001520| 6f 69 6e 74 20 6c 6f 63 | 61 6c 4d 6f 75 73 65 29 |oint loc|alMouse)|
|00001530| 0d 7b 0d 09 69 66 20 28 | 70 61 72 74 20 3d 3d 20 |.{..if (|part == |
|00001540| 69 6e 54 68 75 6d 62 29 | 20 7b 0d 09 09 54 72 61 |inThumb)| {...Tra|
|00001550| 63 6b 43 6f 6e 74 72 6f | 6c 28 73 63 72 6f 6c 6c |ckContro|l(scroll|
|00001560| 42 61 72 2c 6c 6f 63 61 | 6c 4d 6f 75 73 65 2c 6e |Bar,loca|lMouse,n|
|00001570| 69 6c 29 3b 0d 09 09 4d | 6f 76 65 54 65 78 74 28 |il);...M|oveText(|
|00001580| 46 72 6f 6e 74 57 69 6e | 64 6f 77 28 29 2c 73 63 |FrontWin|dow(),sc|
|00001590| 72 6f 6c 6c 42 61 72 29 | 3b 0d 09 7d 0d 09 65 6c |rollBar)|;..}..el|
|000015a0| 73 65 0d 09 09 54 72 61 | 63 6b 43 6f 6e 74 72 6f |se...Tra|ckContro|
|000015b0| 6c 28 73 63 72 6f 6c 6c | 42 61 72 2c 6c 6f 63 61 |l(scroll|Bar,loca|
|000015c0| 6c 4d 6f 75 73 65 2c 28 | 50 72 6f 63 50 74 72 29 |lMouse,(|ProcPtr)|
|000015d0| 20 73 63 72 6f 6c 6c 5f | 61 63 74 69 6f 6e 29 3b | scroll_|action);|
|000015e0| 0d 7d 09 0d 0d 0d 70 61 | 73 63 61 6c 20 42 6f 6f |.}....pa|scal Boo|
|000015f0| 6c 65 61 6e 20 41 75 74 | 6f 53 63 72 6f 6c 6c 28 |lean Aut|oScroll(|
|00001600| 76 6f 69 64 29 0d 7b 0d | 09 52 67 6e 48 61 6e 64 |void).{.|.RgnHand|
|00001610| 6c 65 09 6f 6c 64 43 6c | 69 70 3b 0d 09 50 6f 69 |le.oldCl|ip;..Poi|
|00001620| 6e 74 09 09 6d 6f 75 73 | 65 4c 6f 63 3b 0d 09 52 |nt..mous|eLoc;..R|
|00001630| 65 63 74 09 09 74 65 78 | 74 52 65 63 74 2c 74 65 |ect..tex|tRect,te|
|00001640| 6d 70 52 65 63 74 3b 0d | 09 73 68 6f 72 74 09 09 |mpRect;.|.short..|
|00001650| 64 65 6c 74 61 58 20 3d | 20 30 2c 64 65 6c 74 61 |deltaX =| 0,delta|
|00001660| 59 20 3d 20 30 3b 0d 09 | 43 6f 6e 74 72 6f 6c 48 |Y = 0;..|ControlH|
|00001670| 61 6e 64 6c 65 20 73 42 | 61 72 3b 0d 09 54 45 48 |andle sB|ar;..TEH|
|00001680| 61 6e 64 6c 65 20 74 68 | 65 54 45 3b 0d 09 0d 09 |andle th|eTE;....|
|00001690| 74 68 65 54 45 20 3d 20 | 28 54 45 48 61 6e 64 6c |theTE = |(TEHandl|
|000016a0| 65 29 28 28 28 54 77 69 | 6e 64 6f 77 49 6e 66 6f |e)(((Twi|ndowInfo|
|000016b0| 20 2a 29 47 65 74 57 52 | 65 66 43 6f 6e 28 46 72 | *)GetWR|efCon(Fr|
|000016c0| 6f 6e 74 57 69 6e 64 6f | 77 28 29 29 29 2d 3e 64 |ontWindo|w()))->d|
|000016d0| 61 74 61 29 3b 09 0d 09 | 0d 09 6f 6c 64 43 6c 69 |ata);...|..oldCli|
|000016e0| 70 20 3d 20 4e 65 77 52 | 67 6e 28 29 3b 0d 09 47 |p = NewR|gn();..G|
|000016f0| 65 74 43 6c 69 70 28 6f | 6c 64 43 6c 69 70 29 3b |etClip(o|ldClip);|
|00001700| 0d 09 74 65 6d 70 52 65 | 63 74 20 3d 20 46 72 6f |..tempRe|ct = Fro|
|00001710| 6e 74 57 69 6e 64 6f 77 | 28 29 2d 3e 70 6f 72 74 |ntWindow|()->port|
|00001720| 52 65 63 74 3b 0d 09 43 | 6c 69 70 52 65 63 74 28 |Rect;..C|lipRect(|
|00001730| 26 74 65 6d 70 52 65 63 | 74 29 3b 0d 09 47 65 74 |&tempRec|t);..Get|
|00001740| 4d 6f 75 73 65 28 26 6d | 6f 75 73 65 4c 6f 63 29 |Mouse(&m|ouseLoc)|
|00001750| 3b 0d 09 74 65 78 74 52 | 65 63 74 20 3d 20 28 2a |;..textR|ect = (*|
|00001760| 2a 74 68 65 54 45 29 2e | 76 69 65 77 52 65 63 74 |*theTE).|viewRect|
|00001770| 3b 0d 09 69 66 20 28 6d | 6f 75 73 65 4c 6f 63 2e |;..if (m|ouseLoc.|
|00001780| 76 20 3c 20 74 65 78 74 | 52 65 63 74 2e 74 6f 70 |v < text|Rect.top|
|00001790| 29 0d 09 09 64 65 6c 74 | 61 59 20 3d 20 2d 31 3b |)...delt|aY = -1;|
|000017a0| 0d 09 65 6c 73 65 20 69 | 66 20 28 6d 6f 75 73 65 |..else i|f (mouse|
|000017b0| 4c 6f 63 2e 68 20 3c 20 | 74 65 78 74 52 65 63 74 |Loc.h < |textRect|
|000017c0| 2e 6c 65 66 74 29 0d 09 | 09 64 65 6c 74 61 58 20 |.left)..|.deltaX |
|000017d0| 3d 20 2d 31 3b 0d 09 65 | 6c 73 65 20 69 66 20 28 |= -1;..e|lse if (|
|000017e0| 6d 6f 75 73 65 4c 6f 63 | 2e 76 20 3e 20 74 65 78 |mouseLoc|.v > tex|
|000017f0| 74 52 65 63 74 2e 62 6f | 74 74 6f 6d 29 0d 09 09 |tRect.bo|ttom)...|
|00001800| 64 65 6c 74 61 59 20 3d | 20 31 3b 0d 09 65 6c 73 |deltaY =| 1;..els|
|00001810| 65 20 69 66 20 28 6d 6f | 75 73 65 4c 6f 63 2e 68 |e if (mo|useLoc.h|
|00001820| 20 3e 20 74 65 78 74 52 | 65 63 74 2e 72 69 67 68 | > textR|ect.righ|
|00001830| 74 29 0d 09 09 64 65 6c | 74 61 58 20 3d 20 31 3b |t)...del|taX = 1;|
|00001840| 0d 09 69 66 20 28 64 65 | 6c 74 61 59 29 20 7b 0d |..if (de|ltaY) {.|
|00001850| 09 09 73 42 61 72 20 3d | 20 76 53 63 72 6f 6c 6c |..sBar =| vScroll|
|00001860| 43 6f 6e 74 28 46 72 6f | 6e 74 57 69 6e 64 6f 77 |Cont(Fro|ntWindow|
|00001870| 28 29 29 3b 0d 09 09 69 | 66 20 28 47 65 74 43 74 |());...i|f (GetCt|
|00001880| 6c 56 61 6c 75 65 28 73 | 42 61 72 29 2b 64 65 6c |lValue(s|Bar)+del|
|00001890| 74 61 59 20 3c 3d 20 47 | 65 74 43 74 6c 4d 61 78 |taY <= G|etCtlMax|
|000018a0| 28 73 42 61 72 29 20 26 | 26 0d 09 09 09 47 65 74 |(sBar) &|&....Get|
|000018b0| 43 74 6c 56 61 6c 75 65 | 28 73 42 61 72 29 2b 64 |CtlValue|(sBar)+d|
|000018c0| 65 6c 74 61 59 20 3e 3d | 20 47 65 74 43 74 6c 4d |eltaY >=| GetCtlM|
|000018d0| 69 6e 28 73 42 61 72 29 | 29 20 7b 0d 09 09 09 53 |in(sBar)|) {....S|
|000018e0| 65 74 43 74 6c 56 61 6c | 75 65 28 73 42 61 72 2c |etCtlVal|ue(sBar,|
|000018f0| 47 65 74 43 74 6c 56 61 | 6c 75 65 28 73 42 61 72 |GetCtlVa|lue(sBar|
|00001900| 29 2b 64 65 6c 74 61 59 | 29 3b 0d 09 09 09 4d 6f |)+deltaY|);....Mo|
|00001910| 76 65 54 65 78 74 28 46 | 72 6f 6e 74 57 69 6e 64 |veText(F|rontWind|
|00001920| 6f 77 28 29 2c 73 42 61 | 72 29 3b 0d 09 09 7d 0d |ow(),sBa|r);...}.|
|00001930| 09 7d 0d 09 65 6c 73 65 | 20 69 66 20 28 64 65 6c |.}..else| if (del|
|00001940| 74 61 58 29 20 7b 0d 09 | 09 73 42 61 72 20 3d 20 |taX) {..|.sBar = |
|00001950| 68 53 63 72 6f 6c 6c 43 | 6f 6e 74 28 46 72 6f 6e |hScrollC|ont(Fron|
|00001960| 74 57 69 6e 64 6f 77 28 | 29 29 3b 0d 09 09 69 66 |tWindow(|));...if|
|00001970| 20 28 47 65 74 43 74 6c | 56 61 6c 75 65 28 73 42 | (GetCtl|Value(sB|
|00001980| 61 72 29 2b 64 65 6c 74 | 61 58 20 3c 3d 20 47 65 |ar)+delt|aX <= Ge|
|00001990| 74 43 74 6c 4d 61 78 28 | 73 42 61 72 29 20 26 26 |tCtlMax(|sBar) &&|
|000019a0| 0d 09 09 09 47 65 74 43 | 74 6c 56 61 6c 75 65 28 |....GetC|tlValue(|
|000019b0| 73 42 61 72 29 2b 64 65 | 6c 74 61 58 20 3e 3d 20 |sBar)+de|ltaX >= |
|000019c0| 47 65 74 43 74 6c 4d 69 | 6e 28 73 42 61 72 29 29 |GetCtlMi|n(sBar))|
|000019d0| 20 7b 0d 09 09 09 53 65 | 74 43 74 6c 56 61 6c 75 | {....Se|tCtlValu|
|000019e0| 65 28 73 42 61 72 2c 47 | 65 74 43 74 6c 56 61 6c |e(sBar,G|etCtlVal|
|000019f0| 75 65 28 73 42 61 72 29 | 2b 64 65 6c 74 61 58 29 |ue(sBar)|+deltaX)|
|00001a00| 3b 0d 09 09 09 4d 6f 76 | 65 54 65 78 74 28 46 72 |;....Mov|eText(Fr|
|00001a10| 6f 6e 74 57 69 6e 64 6f | 77 28 29 2c 73 42 61 72 |ontWindo|w(),sBar|
|00001a20| 29 3b 0d 09 09 7d 0d 09 | 7d 09 0d 09 53 65 74 43 |);...}..|}...SetC|
|00001a30| 6c 69 70 28 6f 6c 64 43 | 6c 69 70 29 3b 0d 09 44 |lip(oldC|lip);..D|
|00001a40| 69 73 70 6f 73 65 52 67 | 6e 28 6f 6c 64 43 6c 69 |isposeRg|n(oldCli|
|00001a50| 70 29 3b 0d 09 72 65 74 | 75 72 6e 20 74 72 75 65 |p);..ret|urn true|
|00001a60| 3b 0d 7d 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........|
|00001a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a80| 00 00 01 00 00 00 02 52 | 00 00 01 52 00 00 00 4a |.......R|...R...J|
|00001a90| 6e 54 79 70 65 73 2e 68 | 20 20 0d 09 43 20 74 79 |nTypes.h| ..C ty|
|00001aa0| 70 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 75 |pe defin|itions u|
|00001ab0| 0d 73 63 72 6f 6c 6c 73 | 74 75 66 66 2e 63 02 00 |.scrolls|tuff.c..|
|00001ac0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00001ad0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 a9 8d 49 79 00 00 | 00 00 00 00 02 9c 20 72 |....Iy..|...... r|
|00001b00| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 0d 09 |ights re|served..|
|00001b10| 0d 2a 2f 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 54 |.*/..#if|ndef __T|
|00001b20| 59 50 45 53 5f 5f 0d 23 | 69 6e 63 6c 75 64 65 20 |YPES__.#|include |
|00001b30| 3c 54 79 70 65 73 2e 68 | 3e 0d 23 65 6e 64 69 66 |<Types.h|>.#endif|
|00001b40| 20 2f 2a 20 5f 5f 54 59 | 50 45 53 5f 5f 20 2a 2f | /* __TY|PES__ */|
|00001b50| 0d 0d 2f 2a 20 4d 61 63 | 54 43 50 20 72 65 74 75 |../* Mac|TCP retu|
|00001b60| 72 6e 20 43 6f 64 65 73 | 20 69 6e 20 74 68 65 20 |rn Codes| in the |
|00001b70| 72 61 6e 67 65 20 2d 32 | 33 30 30 30 20 74 68 72 |range -2|3000 thr|
|00001b80| 00 00 00 1e 00 50 00 20 | 03 63 02 3d 00 50 00 20 |.....P. |.c.=.P. |
|00001b90| 03 63 02 3d 00 00 13 d0 | 00 00 00 00 00 00 00 00 |.c.=....|........|
|00001ba0| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 0e |.....H..|Monaco..|
|00001bb0| 00 15 00 0e 00 16 00 0e | 04 0c 00 0e 04 12 00 19 |........|........|
|00001bc0| 00 00 00 19 00 09 00 19 | 00 06 00 04 00 50 00 20 |........|.....P. |
|00001bd0| 01 dd 02 3d 00 50 00 20 | 01 dd 02 3d a3 ed c6 9a |...=.P. |...=....|
|00001be0| 00 00 15 61 00 00 15 6b | 00 00 12 b8 01 00 00 00 |...a...k|........|
|00001bf0| 00 e0 00 0b 00 00 02 cb | 00 00 02 d6 0b 68 53 63 |........|.....hSc|
|00001c00| 72 6f 6c 6c 43 6f 6e 74 | 00 00 03 b2 00 00 03 bd |rollCont|........|
|00001c10| 0b 76 53 63 72 6f 6c 6c | 43 6f 6e 74 00 00 04 90 |.vScroll|Cont....|
|00001c20| 00 00 04 94 05 73 69 67 | 6e 00 00 00 04 e1 00 00 |.....sig|n.......|
|00001c30| 04 ec 0b 4c 69 6e 65 73 | 49 6e 54 65 78 74 00 00 |...Lines|InText..|
|00001c40| 05 de 00 00 05 e6 09 4d | 6f 76 65 54 65 78 74 00 |.......M|oveText.|
|00001c50| 00 00 0a 2a 00 00 0a 39 | 0f 41 64 6a 75 73 74 53 |...*...9|.AdjustS|
|00001c60| 63 72 6f 6c 6c 42 61 72 | 00 00 0c 98 00 00 0c a2 |crollBar|........|
|00001c70| 0b 53 63 72 6f 6c 6c 43 | 68 61 72 00 00 00 0e b7 |.ScrollC|har.....|
|00001c80| 00 00 0e c5 0f 43 68 65 | 63 6b 49 6e 73 65 72 74 |.....Che|ckInsert|
|00001c90| 69 6f 6e 00 00 00 11 40 | 00 00 11 4d 0d 73 63 72 |ion....@|...M.scr|
|00001ca0| 6f 6c 6c 5f 61 63 74 69 | 6f 6e 00 00 14 5c 00 00 |oll_acti|on...\..|
|00001cb0| 14 67 0b 44 6f 53 63 72 | 6f 6c 6c 65 72 73 00 00 |.g.DoScr|ollers..|
|00001cc0| 15 61 00 00 15 6b 0b 41 | 75 74 6f 53 63 72 6f 6c |.a...k.A|utoScrol|
|00001cd0| 6c 00 00 00 01 00 00 00 | 02 52 00 00 01 52 00 00 |l.......|.R...R..|
|00001ce0| 00 4a 00 3f 1d b0 04 c8 | 00 00 00 1c 00 4a 00 00 |.J.?....|.....J..|
|00001cf0| 4d 50 53 52 00 02 00 0a | 03 f0 ff ff 00 00 00 00 |MPSR....|........|
|00001d00| 00 00 00 00 03 ed ff ff | 00 00 00 22 00 00 00 00 |........|..."....|
|00001d10| 03 ef ff ff 00 00 00 6e | 00 40 fa 10 00 00 00 00 |.......n|.@......|
|00001d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+